3.268 \(\int \frac{x (a+b \log (c (d+e x)^n))}{(f+g x^2)^2} \, dx\)

Optimal. Leaf size=139 \[ -\frac{a+b \log \left (c (d+e x)^n\right )}{2 g \left (f+g x^2\right )}-\frac{b e^2 n \log \left (f+g x^2\right )}{4 g \left (d^2 g+e^2 f\right )}+\frac{b e^2 n \log (d+e x)}{2 g \left (d^2 g+e^2 f\right )}+\frac{b d e n \tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right )}{2 \sqrt{f} \sqrt{g} \left (d^2 g+e^2 f\right )} \]

[Out]

(b*d*e*n*ArcTan[(Sqrt[g]*x)/Sqrt[f]])/(2*Sqrt[f]*Sqrt[g]*(e^2*f + d^2*g)) + (b*e^2*n*Log[d + e*x])/(2*g*(e^2*f
 + d^2*g)) - (a + b*Log[c*(d + e*x)^n])/(2*g*(f + g*x^2)) - (b*e^2*n*Log[f + g*x^2])/(4*g*(e^2*f + d^2*g))

________________________________________________________________________________________

Rubi [A]  time = 0.0783081, antiderivative size = 139, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.24, Rules used = {2413, 706, 31, 635, 205, 260} \[ -\frac{a+b \log \left (c (d+e x)^n\right )}{2 g \left (f+g x^2\right )}-\frac{b e^2 n \log \left (f+g x^2\right )}{4 g \left (d^2 g+e^2 f\right )}+\frac{b e^2 n \log (d+e x)}{2 g \left (d^2 g+e^2 f\right )}+\frac{b d e n \tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right )}{2 \sqrt{f} \sqrt{g} \left (d^2 g+e^2 f\right )} \]

Antiderivative was successfully verified.

[In]

Int[(x*(a + b*Log[c*(d + e*x)^n]))/(f + g*x^2)^2,x]

[Out]

(b*d*e*n*ArcTan[(Sqrt[g]*x)/Sqrt[f]])/(2*Sqrt[f]*Sqrt[g]*(e^2*f + d^2*g)) + (b*e^2*n*Log[d + e*x])/(2*g*(e^2*f
 + d^2*g)) - (a + b*Log[c*(d + e*x)^n])/(2*g*(f + g*x^2)) - (b*e^2*n*Log[f + g*x^2])/(4*g*(e^2*f + d^2*g))

Rule 2413

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*(x_)^(m_.)*((f_.) + (g_.)*(x_)^(r_.))^(q_.), x_
Symbol] :> Simp[((f + g*x^r)^(q + 1)*(a + b*Log[c*(d + e*x)^n])^p)/(g*r*(q + 1)), x] - Dist[(b*e*n*p)/(g*r*(q
+ 1)), Int[((f + g*x^r)^(q + 1)*(a + b*Log[c*(d + e*x)^n])^(p - 1))/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e,
 f, g, m, n, q, r}, x] && EqQ[m, r - 1] && NeQ[q, -1] && IGtQ[p, 0]

Rule 706

Int[1/(((d_) + (e_.)*(x_))*((a_) + (c_.)*(x_)^2)), x_Symbol] :> Dist[e^2/(c*d^2 + a*e^2), Int[1/(d + e*x), x],
 x] + Dist[1/(c*d^2 + a*e^2), Int[(c*d - c*e*x)/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a
*e^2, 0]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rubi steps

\begin{align*} \int \frac{x \left (a+b \log \left (c (d+e x)^n\right )\right )}{\left (f+g x^2\right )^2} \, dx &=-\frac{a+b \log \left (c (d+e x)^n\right )}{2 g \left (f+g x^2\right )}+\frac{(b e n) \int \frac{1}{(d+e x) \left (f+g x^2\right )} \, dx}{2 g}\\ &=-\frac{a+b \log \left (c (d+e x)^n\right )}{2 g \left (f+g x^2\right )}+\frac{(b e n) \int \frac{d g-e g x}{f+g x^2} \, dx}{2 g \left (e^2 f+d^2 g\right )}+\frac{\left (b e^3 n\right ) \int \frac{1}{d+e x} \, dx}{2 g \left (e^2 f+d^2 g\right )}\\ &=\frac{b e^2 n \log (d+e x)}{2 g \left (e^2 f+d^2 g\right )}-\frac{a+b \log \left (c (d+e x)^n\right )}{2 g \left (f+g x^2\right )}+\frac{(b d e n) \int \frac{1}{f+g x^2} \, dx}{2 \left (e^2 f+d^2 g\right )}-\frac{\left (b e^2 n\right ) \int \frac{x}{f+g x^2} \, dx}{2 \left (e^2 f+d^2 g\right )}\\ &=\frac{b d e n \tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right )}{2 \sqrt{f} \sqrt{g} \left (e^2 f+d^2 g\right )}+\frac{b e^2 n \log (d+e x)}{2 g \left (e^2 f+d^2 g\right )}-\frac{a+b \log \left (c (d+e x)^n\right )}{2 g \left (f+g x^2\right )}-\frac{b e^2 n \log \left (f+g x^2\right )}{4 g \left (e^2 f+d^2 g\right )}\\ \end{align*}

Mathematica [A]  time = 0.160071, size = 165, normalized size = 1.19 \[ \frac{2 b d e \sqrt{g} n \left (f+g x^2\right ) \tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right )-\sqrt{f} \left (2 a d^2 g+2 a e^2 f+2 b \left (d^2 g+e^2 f\right ) \log \left (c (d+e x)^n\right )-2 b e^2 n \left (f+g x^2\right ) \log (d+e x)+b e^2 g n x^2 \log \left (f+g x^2\right )+b e^2 f n \log \left (f+g x^2\right )\right )}{4 \sqrt{f} g \left (f+g x^2\right ) \left (d^2 g+e^2 f\right )} \]

Antiderivative was successfully verified.

[In]

Integrate[(x*(a + b*Log[c*(d + e*x)^n]))/(f + g*x^2)^2,x]

[Out]

(2*b*d*e*Sqrt[g]*n*(f + g*x^2)*ArcTan[(Sqrt[g]*x)/Sqrt[f]] - Sqrt[f]*(2*a*e^2*f + 2*a*d^2*g - 2*b*e^2*n*(f + g
*x^2)*Log[d + e*x] + 2*b*(e^2*f + d^2*g)*Log[c*(d + e*x)^n] + b*e^2*f*n*Log[f + g*x^2] + b*e^2*g*n*x^2*Log[f +
 g*x^2]))/(4*Sqrt[f]*g*(e^2*f + d^2*g)*(f + g*x^2))

________________________________________________________________________________________

Maple [C]  time = 0.529, size = 765, normalized size = 5.5 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+b*ln(c*(e*x+d)^n))/(g*x^2+f)^2,x)

[Out]

-1/2*b/g/(g*x^2+f)*ln((e*x+d)^n)+1/4*(-I*Pi*b*e^2*f*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2-I*Pi*b*d^2*g*csgn(I*c)*csg
n(I*c*(e*x+d)^n)^2+I*Pi*b*e^2*f*csgn(I*c)*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)+I*Pi*b*e^2*f*csgn(I*c*(e*x+d)^
n)^3+I*Pi*b*d^2*g*csgn(I*c)*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)+I*Pi*b*d^2*g*csgn(I*c*(e*x+d)^n)^3-I*Pi*b*e^
2*f*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2-I*Pi*b*d^2*g*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2+2*ln(e*x+d)*b
*e^2*g*n*x^2+sum(_R*ln(((-d^2*g^2+3*e^2*f*g)*_R+3*b*e^2*n)*x+4*d*e*f*g*_R+b*d*e*n),_R=RootOf((d^2*f*g^3+e^2*f^
2*g^2)*_Z^2+2*b*e^2*f*g*n*_Z+b^2*e^2*n^2))*d^2*g^3*x^2+sum(_R*ln(((-d^2*g^2+3*e^2*f*g)*_R+3*b*e^2*n)*x+4*d*e*f
*g*_R+b*d*e*n),_R=RootOf((d^2*f*g^3+e^2*f^2*g^2)*_Z^2+2*b*e^2*f*g*n*_Z+b^2*e^2*n^2))*e^2*f*g^2*x^2+2*ln(e*x+d)
*b*e^2*f*n+sum(_R*ln(((-d^2*g^2+3*e^2*f*g)*_R+3*b*e^2*n)*x+4*d*e*f*g*_R+b*d*e*n),_R=RootOf((d^2*f*g^3+e^2*f^2*
g^2)*_Z^2+2*b*e^2*f*g*n*_Z+b^2*e^2*n^2))*d^2*f*g^2+sum(_R*ln(((-d^2*g^2+3*e^2*f*g)*_R+3*b*e^2*n)*x+4*d*e*f*g*_
R+b*d*e*n),_R=RootOf((d^2*f*g^3+e^2*f^2*g^2)*_Z^2+2*b*e^2*f*g*n*_Z+b^2*e^2*n^2))*e^2*f^2*g-2*ln(c)*b*d^2*g-2*l
n(c)*b*e^2*f-2*a*d^2*g-2*a*e^2*f)/(g*x^2+f)/g/(d^2*g+e^2*f)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*log(c*(e*x+d)^n))/(g*x^2+f)^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.95012, size = 817, normalized size = 5.88 \begin{align*} \left [-\frac{2 \, a e^{2} f^{2} + 2 \, a d^{2} f g +{\left (b d e g n x^{2} + b d e f n\right )} \sqrt{-f g} \log \left (\frac{g x^{2} - 2 \, \sqrt{-f g} x - f}{g x^{2} + f}\right ) +{\left (b e^{2} f g n x^{2} + b e^{2} f^{2} n\right )} \log \left (g x^{2} + f\right ) - 2 \,{\left (b e^{2} f g n x^{2} - b d^{2} f g n\right )} \log \left (e x + d\right ) + 2 \,{\left (b e^{2} f^{2} + b d^{2} f g\right )} \log \left (c\right )}{4 \,{\left (e^{2} f^{3} g + d^{2} f^{2} g^{2} +{\left (e^{2} f^{2} g^{2} + d^{2} f g^{3}\right )} x^{2}\right )}}, -\frac{2 \, a e^{2} f^{2} + 2 \, a d^{2} f g - 2 \,{\left (b d e g n x^{2} + b d e f n\right )} \sqrt{f g} \arctan \left (\frac{\sqrt{f g} x}{f}\right ) +{\left (b e^{2} f g n x^{2} + b e^{2} f^{2} n\right )} \log \left (g x^{2} + f\right ) - 2 \,{\left (b e^{2} f g n x^{2} - b d^{2} f g n\right )} \log \left (e x + d\right ) + 2 \,{\left (b e^{2} f^{2} + b d^{2} f g\right )} \log \left (c\right )}{4 \,{\left (e^{2} f^{3} g + d^{2} f^{2} g^{2} +{\left (e^{2} f^{2} g^{2} + d^{2} f g^{3}\right )} x^{2}\right )}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*log(c*(e*x+d)^n))/(g*x^2+f)^2,x, algorithm="fricas")

[Out]

[-1/4*(2*a*e^2*f^2 + 2*a*d^2*f*g + (b*d*e*g*n*x^2 + b*d*e*f*n)*sqrt(-f*g)*log((g*x^2 - 2*sqrt(-f*g)*x - f)/(g*
x^2 + f)) + (b*e^2*f*g*n*x^2 + b*e^2*f^2*n)*log(g*x^2 + f) - 2*(b*e^2*f*g*n*x^2 - b*d^2*f*g*n)*log(e*x + d) +
2*(b*e^2*f^2 + b*d^2*f*g)*log(c))/(e^2*f^3*g + d^2*f^2*g^2 + (e^2*f^2*g^2 + d^2*f*g^3)*x^2), -1/4*(2*a*e^2*f^2
 + 2*a*d^2*f*g - 2*(b*d*e*g*n*x^2 + b*d*e*f*n)*sqrt(f*g)*arctan(sqrt(f*g)*x/f) + (b*e^2*f*g*n*x^2 + b*e^2*f^2*
n)*log(g*x^2 + f) - 2*(b*e^2*f*g*n*x^2 - b*d^2*f*g*n)*log(e*x + d) + 2*(b*e^2*f^2 + b*d^2*f*g)*log(c))/(e^2*f^
3*g + d^2*f^2*g^2 + (e^2*f^2*g^2 + d^2*f*g^3)*x^2)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*ln(c*(e*x+d)**n))/(g*x**2+f)**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.37988, size = 294, normalized size = 2.12 \begin{align*} \frac{b d n \arctan \left (\frac{g x}{\sqrt{f g}}\right ) e}{2 \,{\left (d^{2} g + f e^{2}\right )} \sqrt{f g}} - \frac{b n e^{2} \log \left (g x^{2} + f\right )}{4 \,{\left (d^{2} g^{2} + f g e^{2}\right )}} + \frac{b g n x^{2} e^{2} \log \left (x e + d\right ) - b d^{2} g n \log \left (x e + d\right ) - 2 \, b d^{2} g \log \left (c\right ) - 2 \, a d^{2} g - 2 \, b f e^{2} \log \left (c\right ) - 2 \, a f e^{2}}{2 \,{\left (d^{2} g^{3} x^{2} + f g^{2} x^{2} e^{2} + d^{2} f g^{2} + f^{2} g e^{2}\right )}} - \frac{b d^{2} g \log \left (c\right ) + a d^{2} g + b f e^{2} \log \left (c\right ) + a f e^{2}}{2 \,{\left (d^{2} g + f e^{2}\right )}{\left (g x^{2} + f\right )} g} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*log(c*(e*x+d)^n))/(g*x^2+f)^2,x, algorithm="giac")

[Out]

1/2*b*d*n*arctan(g*x/sqrt(f*g))*e/((d^2*g + f*e^2)*sqrt(f*g)) - 1/4*b*n*e^2*log(g*x^2 + f)/(d^2*g^2 + f*g*e^2)
 + 1/2*(b*g*n*x^2*e^2*log(x*e + d) - b*d^2*g*n*log(x*e + d) - 2*b*d^2*g*log(c) - 2*a*d^2*g - 2*b*f*e^2*log(c)
- 2*a*f*e^2)/(d^2*g^3*x^2 + f*g^2*x^2*e^2 + d^2*f*g^2 + f^2*g*e^2) - 1/2*(b*d^2*g*log(c) + a*d^2*g + b*f*e^2*l
og(c) + a*f*e^2)/((d^2*g + f*e^2)*(g*x^2 + f)*g)